﻿<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
			 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

			 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
			 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
			 xmlns:ViewModel="clr-namespace:EcoProIT.UserControles.ViewModel" 
			 xmlns:HelpClasses="clr-namespace:HelpClasses;assembly=HelpClasses" 
			 xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" 
			 xmlns:userControles="clr-namespace:EcoProIT.UserControles"
			 xmlns:AdobeImport="clr-namespace:EcoProIT.UserControles.AdobeImport"
			 x:Name="userControl" 
			 x:Class="EcoProIT.UserControles.ModelNode"         
			 BorderBrush="Black" MaxHeight="100" MaxWidth="160" mc:Ignorable="d" 
			 MouseDoubleClick="MouseDoubleClick_1" AllowDrop="True"  Drop="DropMethod" DragEnter="Drag_Enter" >
	<UserControl.Resources>
        <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="Temp.xaml" />
        </ResourceDictionary.MergedDictionaries>
		<HelpClasses:BooleanToOpacity x:Key="BooleanToOpacity"/>
		<HelpClasses:BooleanToOpacityHidden x:Key="BooleanToOpacity1"/>
        </ResourceDictionary>
    </UserControl.Resources>
	<UserControl.DataContext>
		<ViewModel:ResourceDefinitionModel/>
	</UserControl.DataContext>
	<i:Interaction.Behaviors>
		<userControles:DragBehavior x:Name="MovedPosition" DragBegun="MouseDragElementBehavior_DragBegun"  DragFinished="MouseDragElementBehavior_DragFinished"/>
	</i:Interaction.Behaviors>
	<Viewbox  >
		<DockPanel LastChildFill="True" Loaded="NodeLoaded" >
			<AdobeImport:GeneralNode x:Name="border" DockPanel.Dock="Top" Height="106" 
									 Opacity="{Binding IsMouseOver, Converter={StaticResource BooleanToOpacity}, Mode=OneWay, RelativeSource={RelativeSource Self}}"  ><!--Style="{DynamicResource GeneralNodeStyle}"--> 
				<AdobeImport:GeneralNode.Style>
                    <StyleSelector >
                        <
                    </StyleSelector>
                </AdobeImport:GeneralNode.Style>
                <StackPanel>
					<Border  DockPanel.Dock="Top" Height="106" Background="{Binding Gradient}" Opacity="{Binding ShowResults, Converter={StaticResource BooleanToOpacity1}}" />

					<Grid>
						<Label  FontSize="60"  Content="{Binding ProcessName}"  FontStyle="Normal" HorizontalContentAlignment="Center" HorizontalAlignment="Center"   VerticalAlignment="Center" FontWeight="Bold"    />
						<Viewbox  Height="50" VerticalAlignment="Top" Width="50" Margin="0,0,149,0">

						</Viewbox>
					</Grid>
				</StackPanel>
			</AdobeImport:GeneralNode>
			<Expander VerticalAlignment="Bottom"  DockPanel.Dock="Bottom"  HorizontalAlignment="Center"  Expanded="Expander_Expanded" Collapsed="Expander_Collapsed" ExpandDirection="Down" IsExpanded="true"  />
			<ItemsControl Height="30"  DockPanel.Dock="Bottom" ItemsSource="{Binding Parent.Parent.Parent.ProductLabels, RelativeSource={RelativeSource Self}}">
				<ItemsControl.ItemsPanel>
					<ItemsPanelTemplate>
						<StackPanel   Orientation="Horizontal" VerticalAlignment="Bottom"    />
					</ItemsPanelTemplate>
				</ItemsControl.ItemsPanel>
			</ItemsControl>
		</DockPanel>
	</Viewbox>
</UserControl>
